let SYSTEM_INFO = uni.getSystemInfoSync()
let getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight || 15


const getTitleBarHeight = () => {
	if (uni.getMenuButtonBoundingClientRect) {
		let {
			top,
			height
		} = uni.getMenuButtonBoundingClientRect()
		return height + (top - getStatusBarHeight()) * 2
	} else {
		return 50
	}
}

const getNavBarHeight = () => getStatusBarHeight() + getTitleBarHeight()

export {
	getStatusBarHeight,
	getTitleBarHeight,
	getNavBarHeight
}